//SDK
const QQMapWX = require('../../libs/qqmap-wx-jssdk')
//创建SDK对象并设置API接口密钥
const qqmapsdk = new QQMapWX({
  key: 'VR6BZ-LNCC3-BNJ3Y-OMWXI-FBGZJ-T7BDJ'
})

Page({
  data: {
    markers: [{
      id: 1,
      iconPath: '/images/gps.png',
      longitude: 113.324520,
      latitude: 23.099994
    }]
  },
  onShow: function () {
    //搜索信息
    qqmapsdk.search({
      keyword: '酒店',
      success: res => {
        console.log(res)
      },
      fail: res => {
        console.log(res)
      }
    })
  }
})
